package com.fz.mapper.system;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fz.dto.system.menu.MenuSaveDto;
import com.fz.dto.system.role.RoleQuery;
import com.fz.entity.system.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fz.entity.system.RoleMenu;
import com.fz.vo.system.menu.MenuVo;
import com.fz.vo.system.role.RoleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author fh
 * @since 2021-03-15
 */
public interface RoleMapper extends BaseMapper<Role> {

     List<Role> selectUserRoleListByUserId(@Param("userid") Integer userid);

    /*public List<RoleVo> findRule();*/
     IPage<RoleVo> findRoleList(Page<RoleVo> page);

     List<RoleMenu> findRoleMenu();

     List<MenuVo> findMenuByRoleId(int roleId);

     List<RoleVo> findRoleVo(@Param("roleQuery") RoleQuery roleQuery);

     void delRoleMenu(@Param("roleMenu") RoleMenu roleMenu);

     void insertRoleMenu(@Param("menus") List<Integer> menus, @Param("id") int id);
}
